package com.zt.ztyh.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zt.ztyh.dto.FundsCount;
import com.zt.ztyh.dto.FundsDto;
import com.zt.ztyh.dto.FundsUserDto;
import com.zt.ztyh.dto.LoanDto;
import com.zt.ztyh.entity.User;
import com.zt.ztyh.entity.ZtyhFundsUser;
import com.zt.ztyh.vo.funds.FundsUserVo;
import com.zt.ztyh.vo.loan.LoanVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author JIASC
* @description 针对表【ztyh_funds_user】的数据库操作Mapper
* @createDate 2024-04-06 17:26:54
* @Entity com.zt.ztyh.domain.ZtyhFundsUser
*/
public interface ZtyhFundsUserMapper extends BaseMapper<ZtyhFundsUser> {

    List<FundsCount> findAll();

    List<FundsCount> findbyfunds(Long fundsId);

    int updateFunds(FundsUserDto fundsUserDto);

    ZtyhFundsUser selectByUserIdAndFundsId(@Param("userId") Long userId, @Param("fundsId") Long fundsId);



    ZtyhFundsUser fundsUserById(Long id);

    @Select("select * from ztyh_user where id=#{uid}")
    User findUserInfo(Long uid);

    Page<FundsUserVo> findByUser(@Param("page") Page<FundsUserVo> page,@Param("fundsDto") FundsDto fundsDto);
}




